{*head部分*}
{include file='Public/head.html'}
<div class="wrapper">
    <!-- START HEADER -->
    {*页头部分*}
    {include file='Public/ghead.html'}
    <!-- END HEADER -->

    <!-- START MAIN -->
    <div id="main">
        <!-- START SIDEBAR -->
        {*导航部分*}
        {include file='Public/nav.html'}
        <!-- END SIDEBAR -->

        <!-- START PAGE -->
        <div id="page">
            <!-- start page title -->
            <div class="page-title">
                <div class="in">
                    <div class="titlebar">	<h2>博文管理</h2>	<p>博文列表</p></div>

                    <div class="clear"></div>
                </div>
            </div>
            <!-- end page title -->

            <!-- START CONTENT -->
            <div class="content">
                <div class="simplebox grid740" style="z-index: 720;">
                    <div class="titleh" style="z-index: 710;">
                        <h3>搜索</h3>
                    </div>
                    <div class="body" style="z-index: 690;">

                        <form id="form2" name="form2" method="post" action="{$url}?p=admin&m=Article&a=showList">
                            <input type="hidden" name="p" value="back"/>
                            <input type="hidden" name="m" value="article"/>
                            <div class="st-form-line" style="z-index: 680;">
                                <span class="st-labeltext">标题</span>
                                <input name="s_title" type="text" class="st-forminput" style="width:510px" value="{$s_title}">
                                <div class="clear" style="z-index: 670;"></div>
                            </div>
                            <div class="st-form-line" style="z-index: 640;">
                                <span class="st-labeltext">分类</span>
                                <select class="uniform" name="s_cat_id">
                                    <option value="0">任意</option>
                                   {foreach from=$tree item='category' key='k'}
<option value="{$category['id']}"{if $s_cat_id ==$category['id']}selected="selected"{/if}>{'--'|str_repeat:$category['level']}{$category['name']}</option>
                                    {/foreach}
                                    <!--<option value="1">科技1</option>-->
                                    <!--<option value="5">&#45;&#45;&#45;&#45;IT</option>-->
                                    <!--<option value="6">&#45;&#45;&#45;&#45;生物</option>-->
                                    <!--<option value="7">&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;鸟类</option>-->
                                    <!--<option value="2">武侠</option>-->
                                    <!--<option value="3">旅游</option>-->
                                    <!--<option value="4">美食</option>-->
                                    <!--<option value="8">&#45;&#45;&#45;&#45;湘菜</option>-->
                                    <!--<option value="11">&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;跳跳蛙</option>-->
                                    <!--<option value="12">&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;口味虾</option>-->
                                    <!--<option value="13">&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;臭豆腐</option>-->
                                    <!--<option value="9">&#45;&#45;&#45;&#45;粤菜</option>-->
                                    <!--<option value="14">&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;白切鸡</option>-->
                                    <!--<option value="15">&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;隆江猪脚</option>-->
                                    <!--<option value="10">&#45;&#45;&#45;&#45;川菜</option>-->
                                </select>
                                <div class="clear"></div>
                            </div>
                            <div class="st-form-line">
                                <span class="st-labeltext">状态</span>
                                <select class="uniform" name="s_status">
                                    <option value="">任意</option>
                                    <option value="1"{if $s_status ==1}selected="selected"{/if}>草稿</option>
                                    <option value="2"{if $s_status ==2}selected="selected"{/if}>公开</option>
                                    <option value="3"{if $s_status ==3}selected="selected"{/if}>隐藏</option>
                                </select>
                                <div class="clear"></div>
                            </div>
                            <div class="button-box" style="z-index: 460;">
                                <input type="submit" name="button" id="button" value="提交" class="st-button">
                            </div>
                        </form>

                    </div>
                </div>

                <!-- START TABLE -->
                <div class="simplebox grid740">

                    <div class="titleh">
                        <h3>博文列表</h3>
                    </div>

                    <table id="myTable" class="tablesorter">
                        <thead>
                        <tr>
                            <th>#ID</th>
                            <th>分类</th>
                            <th>标题</th>
                            <th>发布日期</th>

                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach from=$article item='row' key='k'}
                        <tr>
                            <td>{$row['id']}</td>
                            <td>{$row['c_name']}</td>
                            <td>{$row['title']}</td>
                            <td>{$row['pubtime']|date_format:'%Y-%m-%d %H-%M'}</td>
                            <td>{if $row['status']==1}草稿{elseif $row['status']==2}公开{else}隐藏{/if}</td>

                            <td>
                                <a href="{$url}?p=admin&m=Article&a=showUpd&id={$row['id']}" >编辑</a>
                                <a href="{$url}?p=admin&m=Article&a=del&id={$row['id']}" onClick="return confirm('是否确认删除');">删除</a>
                            </td>
                        </tr>
                        {/foreach}
                        <!--<tr>-->
                            <!--<td>2</td>-->
                            <!--<td>口味蛙</td>-->
                            <!--<td>剁椒鱼头</td>-->
                            <!--<td>2017-03-27</td>-->
                            <!--<td>12</td>-->
                            <!--<td>100</td>-->
                            <!--<td>-->
                                <!--<a href="#" >编辑</a>-->
                                <!--<a href="#" onClick="return confirm('是否确认删除文章：口味蛙？');">删除</a>-->
                            <!--</td>-->
                        <!--</tr>-->
                        <!--<tr>-->
                            <!--<td>3</td>-->
                            <!--<td>口味蛙</td>-->
                            <!--<td>萝卜炖牛腩</td>-->
                            <!--<td>2017-03-27</td>-->
                            <!--<td>12</td>-->
                            <!--<td>100</td>-->
                            <!--<td>-->
                                <!--<a href="#" >编辑</a>-->
                                <!--<a href="#" onClick="return confirm('是否确认删除文章：口味蛙？');">删除</a>-->
                            <!--</td>-->
                        <!--</tr>-->
                        </tbody>
                    </table>
                    <ul class="pagination">
                        {$strPage}
                        <!--<li><a href='#'>1</a></li>-->
                        <!--<li><a href='#'>2</a></li>-->
                        <!--<li><a href='#'>3</a></li>-->
                        <!--<li><a href='#'>4</a></li>-->
                        <!--<li><a href='#'>下一页</a></li>-->
                    </ul>
                </div>
                <!-- END TABLE -->
            </div>
            <!-- END CONTENT -->
        </div>
        <!-- END PAGE -->
        <div class="clear"></div>
    </div>
    <!-- END MAIN -->

    {*页脚部分*}
    {include file='Public/footer.html'}